]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screencastService: Do not try multiple pipelines on old Pipewire versions
authorrobert.mader@collabora.com <robert.mader@collabora.com>
Mon, 20 Feb 2023 17:27:32 +0000 (18:27 +0100)
committerrobert.mader@collabora.com <robert.mader@collabora.com>
Wed, 26 Apr 2023 10:48:32 +0000 (12:48 +0200)
Pipewire versions < 0.3.67 may not fail immediatly on negotiation
errors, thus use the last/fallback pipeline directly.
Technically, a similar recent version of Wireplumber is required
as well, but we can't check that easily and the combination of old
Wireplumber and new Pipewire is quite unlikely.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2609>

js/dbusServices/screencast/screencastService.js

index 1bc41a651c78cb01460dec9fa44661608135202f..3183a0093db842ad3783770ef51cd24d91d2686d 100644 (file)
@@ -244,7 +244,10 @@ var Recorder = class {
                     this._nodeId = nodeId;
 
                     this._pipelineState = PipelineState.STARTING;
-                    this._pipelineConfigs = PIPELINES.values();
+                    const fallbackSupported =
+                        Gst.Registry.get().check_feature_version('pipewiresrc', 0, 3, 67);
+                    this._pipelineConfigs = fallbackSupported
+                        ? PIPELINES.values() : [PIPELINES.at(-1)].values();
                     this._tryNextPipeline();
                 });
             this._sessionProxy.StartSync();